package com.oo.parkinglot;

public class Car {

    private String carNum;

    public String getCarNum() {
        return carNum;
    }

    public Car(String carNum) {
        this.carNum = carNum;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof Car) {
            Car car = (Car) obj;
            if (this.carNum.equals(car.getCarNum())) {
                return true;
            }
        }
        return false;
    }
}
